%% Intermediary constraints
% LS_Call and LS_Put are the Q5-Q1 call and put option returns sorted by PRisk 
% INSERT VARIABLES HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ret = LS_Put; % LS_Put is time-series Q5-Q1 delta-hedged option returns sorted by PRisk (02/2003 - 06/2019)
   Ret = (Ret+[Ret(2:end);nan]+[Ret(3:end);nan;nan])/3; % Average Return over the next 3 months
NW = 3; % Newey-West lag
   % Because the PNBON is only available until from 01/2003 to 12/2012 (120 months)
   % The analysis will be during these 120 months
Factors = 100*[mktrf_m(2:end) smb_m(2:end) hml_m(2:end) umd_m(2:end) strdl_m(2:end) dvix_m(2:end)];
Ret = Ret(1:120); Factors = (Factors(1:120,:)+Factors(2:121,:)+Factors(3:122,:))/3;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Regression results
% Full sample
stat_full = nwest(Ret, [ones(size(Ret,1),1) PNBON Factors], NW); 

% When b_VP < 0
Ret(find(b_VP==0))=[]; Factors(find(b_VP==0),:)=[]; PNBON(find(b_VP==0))=[];
stat_bVP = nwest(Ret, [ones(size(Ret,1),1) PNBON Factors], NW); 
clear Ret NW Factors  